{% extends 'admin/admin.html' %}
{% import 'ui/admin_page.html' as pg  %}
{% block content %}
    <!--内容-->
    <section class="content-header">
        <h1>微电影管理系统</h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 管理员管理</a></li>
            <li class="active">管理员列表</li>
        </ol>
    </section>
    <section class="content" id="showcontent">
        <div class="row">
            <div class="col-md-12">
                <div class="box box-primary">
                    <div class="box-header">
                        <h3 class="box-title">管理员列表</h3>
                        <div class="box-tools">
                            <div class="input-group input-group-sm" style="width: 150px;">
                                <input type="text" name="table_search" class="form-control pull-right"
                                       placeholder="请输入关键字...">

                                <div class="input-group-btn">
                                    <button type="submit" class="btn btn-default"><i class="fa fa-search"></i>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="box-body table-responsive no-padding">
                        <table class="table table-hover">
                            <tbody>
                            <tr>
                                <th>编号</th>
                                <th>管理员名称</th>
                                <th>管理员类型</th>
                                <th>管理员角色</th>
                                <th>添加时间</th>
                            </tr>
                            {% for v in page_data.items %}

                            <tr>
                                <td>{{ v.id }}</td>
                                <td>{{ v.name }}</td>
                                {% if v.is_super == 0 %}
                                    <td>超级管理员</td>
                                {% else %}
                                    <td>普通管理员</td>
                                {% endif %}

                                <td>{{ v.role.name }}</td>
                                <td>{{ v.addtime }}</td>
                            </tr>
                            {% endfor %}

                            </tbody>
                        </table>
                    </div>
                    <div class="box-footer clearfix">
                        <ul class="pagination pagination-sm no-margin pull-right">
                            {{ pg.page(page_data,'admin.admin_list') }}
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!--内容-->
{% endblock %}
{% block js %}
    <script>
        $(document).ready(function () {
            $('#g-11').addClass('active');
            $('#g-11-2').addClass('active');
        })
    </script>
{% endblock %}